using UnityEngine;

public class PartRenderer : MonoBehaviour
{
	public Transform[] transforms;

	private LineRenderer line;

	private Material startMat;

	private void Start()
	{
		line = GetComponent<LineRenderer>();
		line.positionCount = transforms.Length;
		startMat = line.sharedMaterial;
		Update();
	}

	private void Update()
	{
		for (int i = 0; i < transforms.Length; i++)
		{
			LineRenderer lineRenderer = line;
			int index = i;
			Vector3 position = transforms[i].position;
			float y = position.y;
			Vector3 position2 = transforms[i].position;
			lineRenderer.SetPosition(index, new Vector3(0f, y, position2.z));
		}
		line.enabled = true;
	}
}
